Ext.define('App.datacollection.collectiontask.view.field.TaskParameterGridField', {
    extend: 'Extend.form.field.GridField',
    alias: ['widget.TaskParameterGridField'],
    roweditable: true,
    requires: ['App.datacollection.collectiontask.model.TaskParameterModel'],
    model: 'App.datacollection.collectiontask.model.TaskParameterModel',
    columns: [{
        text: '参数名称',
        dataIndex: 'name'
    }, {
        text: '值',
        dataIndex: 'value',
        renderer: function (v, m, r) {
            if (r.get('name') == "password") {
                return "******";
            } else {
                return v;
            }
        },
        editor: {
            xtype: 'textfield',
            itemId: 'value'
        }
    }],
    setValue: function (value) {
        if (Ext.isString(value)) {
            value = Ext.decode(value);
        }
        this.callParent(arguments);
    }
});